using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._Analysis
{
    /// <summary>
    /// <para>Generate Desire Lines</para>
    /// <para>Generates a series of lines from each customer to an associated store location. These lines are often called spider diagrams.</para>
    /// <para>生成从每个客户到关联商店位置的一系列行。这些线通常称为蜘蛛图。</para>
    /// </summary>    
    [DisplayName("Generate Desire Lines")]
    public class DesireLines : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DesireLines()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_stores_layer">
        /// <para>Store Layer</para>
        /// <para>The input point layer representing store or facility locations.</para>
        /// <para>表示商店或设施位置的输入点图层。</para>
        /// </param>
        /// <param name="_in_customers_layer">
        /// <para>Customer Layer</para>
        /// <para>The input point layer representing customers or patrons.</para>
        /// <para>表示客户或顾客的输入点图层。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The resultant feature class that will be added to the Contents pane.</para>
        /// <para>将添加到内容窗格的结果要素类。</para>
        /// </param>
        /// <param name="_store_id_field">
        /// <para>Store ID Field</para>
        /// <para>A unique ID field representing a store or facility location.</para>
        /// <para>表示商店或设施位置的唯一 ID 字段。</para>
        /// </param>
        /// <param name="_link_field">
        /// <para>Associated Store ID Field</para>
        /// <para>An ID field used to assign individual customers to stores.</para>
        /// <para>用于将单个客户分配到商店的 ID 字段。</para>
        /// </param>
        public DesireLines(object _in_stores_layer, object _in_customers_layer, object _out_feature_class, object _store_id_field, object _link_field)
        {
            this._in_stores_layer = _in_stores_layer;
            this._in_customers_layer = _in_customers_layer;
            this._out_feature_class = _out_feature_class;
            this._store_id_field = _store_id_field;
            this._link_field = _link_field;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Generate Desire Lines";

        public override string CallName => "ba.DesireLines";

        public override List<string> AcceptEnvironments => ["baDataSource", "baNetworkSource", "workspace"];

        public override object[] ParameterInfo => [_in_stores_layer, _in_customers_layer, _out_feature_class, _store_id_field, _link_field, _distance_type, _units, _cutoff, _travel_direction.GetGPValue(), _time_of_day, _time_zone.GetGPValue()];

        /// <summary>
        /// <para>Store Layer</para>
        /// <para>The input point layer representing store or facility locations.</para>
        /// <para>表示商店或设施位置的输入点图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_stores_layer { get; set; }


        /// <summary>
        /// <para>Customer Layer</para>
        /// <para>The input point layer representing customers or patrons.</para>
        /// <para>表示客户或顾客的输入点图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Customer Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_customers_layer { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The resultant feature class that will be added to the Contents pane.</para>
        /// <para>将添加到内容窗格的结果要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Store ID Field</para>
        /// <para>A unique ID field representing a store or facility location.</para>
        /// <para>表示商店或设施位置的唯一 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _store_id_field { get; set; }


        /// <summary>
        /// <para>Associated Store ID Field</para>
        /// <para>An ID field used to assign individual customers to stores.</para>
        /// <para>用于将单个客户分配到商店的 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Associated Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _link_field { get; set; }


        /// <summary>
        /// <para>Distance Type</para>
        /// <para><xdoc>
        ///   <para>The method of travel that will be used for distance calculation. Straight Line is the default value.</para>
        ///   <para>When using Portal for ArcGIS or local data sources, travel mode options are dynamically populated.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于距离计算的旅行方法。直线是默认值。</para>
        ///   <para>使用 Portal for ArcGIS 或本地数据源时，将动态填充出行模式选项。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _distance_type { get; set; } = null;


        /// <summary>
        /// <para>Measure Units</para>
        /// <para>The type of distance- or time-measuring units that will be used when calculating minimal distance.</para>
        /// <para>计算最小距离时将使用的距离测量单位或时间测量单位的类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _units { get; set; } = null;


        /// <summary>
        /// <para>Cutoff</para>
        /// <para>The distance beyond which customers will be considered outliers and excluded from consideration during desire line generation.</para>
        /// <para>在欲望线生成过程中，客户将被视为异常值并被排除在考虑范围之外的距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cutoff")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _cutoff { get; set; } = null;


        /// <summary>
        /// <para>Travel Direction</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of travel that will be used between stores and demand points.</para>
        ///   <bulletList>
        ///     <bullet_item>Toward Stores—The direction of travel will be from demand points to stores. This is the default.</bullet_item><para/>
        ///     <bullet_item>Away from Stores—The direction of travel will be from stores to demand points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在商店和需求点之间使用的行驶方向。</para>
        ///   <bulletList>
        ///     <bullet_item>朝向商店 - 行进方向将从需求点到商店。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>远离商店 - 行进方向将从商店到需求点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel Direction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _travel_direction_value _travel_direction { get; set; } = _travel_direction_value._TOWARD_STORES;

        public enum _travel_direction_value
        {
            /// <summary>
            /// <para>Toward Stores</para>
            /// <para>Toward Stores—The direction of travel will be from demand points to stores. This is the default.</para>
            /// <para>朝向商店 - 行进方向将从需求点到商店。这是默认设置。</para>
            /// </summary>
            [Description("Toward Stores")]
            [GPEnumValue("TOWARD_STORES")]
            _TOWARD_STORES,

            /// <summary>
            /// <para>Away from Stores</para>
            /// <para>Away from Stores—The direction of travel will be from stores to demand points.</para>
            /// <para>远离商店 - 行进方向将从商店到需求点。</para>
            /// </summary>
            [Description("Away from Stores")]
            [GPEnumValue("AWAY_FROM_STORES")]
            _AWAY_FROM_STORES,

        }

        /// <summary>
        /// <para>Time of Day</para>
        /// <para>The time at which travel begins.</para>
        /// <para>旅行开始的时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time of Day")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_of_day { get; set; } = null;


        /// <summary>
        /// <para>Time Zone</para>
        /// <para><xdoc>
        ///   <para>Specifies the time zone that will be used for the Time of Day parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>UTC—Coordinated universal time (UTC) will be used. Choose this option if you want to choose the best location for a specific time, such as now, but aren't certain in which time zone the stores or demand points will be located.</bullet_item><para/>
        ///     <bullet_item>Local time at locations—The time zone in which the stores or demand points are located will be used. If Travel Direction is Away from Stores, this is the time zone of the stores. If Travel Direction is Toward Stores, this is the time zone of the demand points. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于“时间”参数的时区。</para>
        ///   <bulletList>
        ///     <bullet_item>UTC—将使用协调世界时 （UTC）。如果您想在特定时间（例如现在）选择最佳位置，但不确定商店或需求点将位于哪个时区，请选择此选项。</bullet_item><para/>
        ///     <bullet_item>地点的本地时间 - 将使用商店或需求点所在的时区。如果“行进方向”为“远离商店”，则这是商店的时区。如果“行驶方向”为“面向商店”，则这是需求点的时区。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Zone")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _time_zone_value _time_zone { get; set; } = _time_zone_value._TIME_ZONE_AT_LOCATION;

        public enum _time_zone_value
        {
            /// <summary>
            /// <para>UTC</para>
            /// <para>UTC—Coordinated universal time (UTC) will be used. Choose this option if you want to choose the best location for a specific time, such as now, but aren't certain in which time zone the stores or demand points will be located.</para>
            /// <para>UTC—将使用协调世界时 （UTC）。如果您想在特定时间（例如现在）选择最佳位置，但不确定商店或需求点将位于哪个时区，请选择此选项。</para>
            /// </summary>
            [Description("UTC")]
            [GPEnumValue("UTC")]
            _UTC,

            /// <summary>
            /// <para>Local time at locations</para>
            /// <para>Local time at locations—The time zone in which the stores or demand points are located will be used. If Travel Direction is Away from Stores, this is the time zone of the stores. If Travel Direction is Toward Stores, this is the time zone of the demand points. This is the default.</para>
            /// <para>地点的本地时间 - 将使用商店或需求点所在的时区。如果“行进方向”为“远离商店”，则这是商店的时区。如果“行驶方向”为“面向商店”，则这是需求点的时区。这是默认设置。</para>
            /// </summary>
            [Description("Local time at locations")]
            [GPEnumValue("TIME_ZONE_AT_LOCATION")]
            _TIME_ZONE_AT_LOCATION,

        }

        public DesireLines SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}